Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@contentful/f36-accordion

Package Overview
Dependencies
Maintainers
0
Versions
354
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@contentful/f36-accordion

Forma 36: Accordion React Component

  • 4.74.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
24K
decreased by-14.81%
Maintainers
0
Weekly downloads
 
Created
Source

title: 'Accordion' type: 'component' slug: /components/accordion/ github: 'https://github.com/contentful/forma-36/tree/main/packages/components/accordion' typescript: ./src/Accordion.tsx,./src/AccordionItem/AccordionItem.tsx

Store longer content in sections users can open one at a time.

Keep the section titles short.

Import

import { Accordion } from '@contentful/f36-components';
// or
import { Accordion } from '@contentful/f36-accordion';

Examples

The accordion has two variations that define the alignment of the chevron icon: left or right.

Basic usage

Using it with other components

Other typographic components can be passed as the accordion's title and anything can be used as the accordion's content. For example:

Controlled Accordion

By default, the AccordionItem is uncontrolled (manage it's expanded state by itself) But you can make it controlled by providing boolean value to isExpanded for Accordion.Item component

Props (API reference)

Accordion

Accordion.Item

Content guidelines

  • The title should be a short message that summarize the content of the accordion.
  • Anything can be passed as the content of the accordion, but often organizing it with Texts and Tables would be enough.
  • When using headings, be mindful about the heading levels. The header is a Subheading with h2 tag.

Accessibility

  • It allows keyboard navigation to open and close the accordions

FAQs

Package last updated on 16 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc